<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: shuangchenyue
  Date: 2021/6/13
  Time: 19:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <meta charset="UTF-8">
        <title>我的购物车</title>
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css">
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/tubiao.css">
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/shopCart.css">
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/order.css">
    </head>
<body>
<header>
    <div class="top center"style="text-align: center">
        <div class="right fr">
            <div class="gouwuche fr"><a href="${pageContext.request.contextPath}/gouwuche.html">购物车</a></div>
            <div class="fr">
                <ul>
                    <li><a href="${pageContext.request.contextPath}/mvc/toUpdate.do"><i id="userIcon" class="iconfont">&#xe669;</i> ${sessionScope.user.name}</a></li>
                    <li>|</li>
                    <li><a href="${pageContext.request.contextPath}/mvc/logout.do"><i id="logoutIcon" class="iconfont" style="color: red;">&#xe605;</i></a></li>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
</header>
<body>
<%--整个界面start--%>
<div id="selfinfo">
    <h1 id="h102">个人信息</h1>
    <ul>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">姓名：${sessionScope.user.name}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">邮箱：${sessionScope.user.userinfo.email}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">手机号码：${sessionScope.user.userinfo.phone}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">国家：${sessionScope.user.userinfo.country.name}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">省份：${sessionScope.user.userinfo.province.name}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">城市：${sessionScope.user.userinfo.city}</li>
        <li style="width: 1200px;height: 50px;line-height: 50px;border: 1px solid lightgray;margin-top: 6px;border-radius: 3px">详细地址：${sessionScope.user.userinfo.addressdetail}</li>
    </ul>
</div>

<div id="divblank"></div>
<div id="divblank"></div>
<div id="divblank"></div>

<div id="div01">

    <div>
        <h1 id="h101">我的订单</h1>
    </div>

    <form action="${pageContext.request.contextPath}/mvc/submitOrder.do" method="post">
        <table>
            <tr style="font-weight: bold">
                <td>序号</td>
                <td>商品图片</td>
                <td>商品名称</td>
                <td>商品单价</td>
                <td>商品数量</td>
                <td>总计</td>
            </tr>

            <c:forEach items="${sessionScope.shopCarts}" var="item" varStatus="status">
                <tr>
                    <td>${status.count}</td>
                    <td><img src="${pageContext.request.contextPath}/${item.product.cartimages}"></td>
                    <td>${item.product.name}</td>
                    <td>$ ${item.product.baseprice}</td>
                    <td>${item.amount}</td>
                    <td>$ ${item.amount*item.product.baseprice}</td>
                </tr>
            </c:forEach>
        </table>
        <div style="width: 1220px;height: 50px;line-height: 50px;"><h3 style="color: #FF6700;font-family: Consolas;">订单号：${requestScope.orderNo}</h3>  <h3 style="color: #FF6700;font-family: Consolas;float: right;margin-top: -50px;margin-right: 200px">共付款：$ ${requestScope.total}</h3><div style="width:150px;height: 50px;background-color: #ff6700;text-align: center;float: right;margin-top: -50px">
            <input type="submit" value="提交订单" style="width: 150px;height: 50px;background-color: #ff6700;border: none;font-size: 20px;color: white;font-weight: bold;cursor: pointer"></div></div>
    </form>

</div>
<%--整个界面end--%>
<footer>
    <div class="copyright">简体 | 繁体 | English | 常见问题</div>
    <div class="copyright">罗德岛制药公司版权所有-罗ICP备111451419-<img src="image/ghs.png" alt="">罗公网安备1145141919810号-罗ICP证114514号</div>
</footer>
</body>
</body>
</html>
